﻿using M5.GeminiHybird.Core.Attribute;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;

namespace M5.GeminiHybird.Core.JavascriptEvent
{
    public class Win32Event : BaseJavescriptEvent
    {
        [JavascriptMethod]
        public void OpenBrowser(bool isIE, string url)
        {
            if (isIE)
                System.Diagnostics.Process.Start("iexplore.exe", url);
            else
                System.Diagnostics.Process.Start(url);
        }

        [JavascriptMethod]
        public void CopyFile(string filePath, string copy2Path)
        {
            File.Copy(filePath, copy2Path);
        }
    }
}
